package com.mycompany.myapp.service.dto;

import com.mycompany.myapp.domain.enumeration.Sex;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Objects;
import java.util.Set;
import javax.validation.constraints.*;

/**
 * A DTO for the {@link com.mycompany.myapp.domain.Student} entity.
 */
public class StudentDTO implements Serializable {

    private Long id;

    @NotNull
    private String studentNumber;

    private String studentName;

    private Integer studentStatus;

    @NotNull
    private String studentPassword;

    private Sex studentSex;

    private String address;

    private Set<UserClassDTO> userClasses = new HashSet<>();

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStudentNumber() {
        return studentNumber;
    }

    public void setStudentNumber(String studentNumber) {
        this.studentNumber = studentNumber;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public Integer getStudentStatus() {
        return studentStatus;
    }

    public void setStudentStatus(Integer studentStatus) {
        this.studentStatus = studentStatus;
    }

    public String getStudentPassword() {
        return studentPassword;
    }

    public void setStudentPassword(String studentPassword) {
        this.studentPassword = studentPassword;
    }

    public Sex getStudentSex() {
        return studentSex;
    }

    public void setStudentSex(Sex studentSex) {
        this.studentSex = studentSex;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Set<UserClassDTO> getUserClasses() {
        return userClasses;
    }

    public void setUserClasses(Set<UserClassDTO> userClasses) {
        this.userClasses = userClasses;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof StudentDTO)) {
            return false;
        }

        StudentDTO studentDTO = (StudentDTO) o;
        if (this.id == null) {
            return false;
        }
        return Objects.equals(this.id, studentDTO.id);
    }

    @Override
    public int hashCode() {
        return Objects.hash(this.id);
    }

    // prettier-ignore
    @Override
    public String toString() {
        return "StudentDTO{" +
            "id=" + getId() +
            ", studentNumber='" + getStudentNumber() + "'" +
            ", studentName='" + getStudentName() + "'" +
            ", studentStatus=" + getStudentStatus() +
            ", studentPassword='" + getStudentPassword() + "'" +
            ", studentSex='" + getStudentSex() + "'" +
            ", address='" + getAddress() + "'" +
            ", userClasses=" + getUserClasses() +
            "}";
    }
}
